﻿#pragma once

/** rgb格式转yuv格式 */
int RgbToYuv(unsigned char* RgbBuf,
	unsigned int nWidth, unsigned int nHeight,
	unsigned char* yuvBuf, unsigned long* len);

/** jpeg格式转yuv格式 */
int JpegToYuv(unsigned char* jpeg_buffer, int jpeg_size,
	unsigned char** yuv_buffer, int width, int height);

/** yuyv422转换为yuv420 */
void yuyv422_to_yuv420(unsigned char* in, unsigned char* out, int width, int height);

/** yuv422转换为yuv420 */
void yuv422_to_yuv420(unsigned char* in, unsigned char* out, int width, int height);